#ifndef __BRIDGE_H__
#define __BRIDGE_H__

#include <iostream>

/// @brief 手机软件
class HandsetSoft
{
public:
    virtual void Run() = 0;
};

/// @brief 手机品牌
class HandsetBrand
{
protected:
    HandsetSoft *m_soft{};

public:
    void SetSoft(HandsetSoft *soft)
    {
        m_soft = soft;
    }
    virtual void Run()
    {
        m_soft->Run();
    }
};

/// @brief 手机品牌A
class HandsetBrandA : public HandsetBrand
{
public:
    virtual void Run() override
    {
        m_soft->Run();
    }
};
/// @brief 手机品牌B
class HandsetBrandB : public HandsetBrand
{
public:
    virtual void Run() override
    {
        m_soft->Run();
    }
};
/// @brief 手机游戏软件A
class HandsetGameSoftA : public HandsetSoft
{
public:
    virtual void Run() override
    {
        std::cout << "运行A游戏软件\n";
    }
};
/// @brief 手机游戏软件B
class HandsetGameSoftB : public HandsetSoft
{
public:
    virtual void Run() override
    {
        std::cout << "运行B游戏软件\n";
    }
};
/// @brief 手机通讯录软件A
class HandsetAddressListSoftA : public HandsetSoft
{
public:
    virtual void Run() override
    {
        std::cout << "运行A通讯录软件\n";
    }
};
/// @brief 手机通讯录软件B
class HandsetAddressListSoftB : public HandsetSoft
{
public:
    virtual void Run() override
    {
        std::cout << "运行B通讯录软件\n";
    }
};

#endif